/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package bean;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.Table;
import javax.persistence.ManyToOne;
import javax.persistence.JoinColumn;
import javax.persistence.FetchType;

;

/**
 * 
 * @author Daniel Rodrigues
 */

@Entity
@Table(name = "funcionario")
@PrimaryKeyJoinColumn(name = "id")
public class Funcionario extends Pessoa implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -803279197541108967L;
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "idCargo", nullable = false, insertable = false, updatable = false)
	private Cargo cargo;

	public Funcionario(long id, String nome, String endereco, String telefone,
			String CPF) {
		super(id, nome, endereco, telefone, CPF);
		// TODO Auto-generated constructor stub
	}

	public Cargo getCargo() {
		return cargo;
	}

	public void setCargo(Cargo cargo) {
		this.cargo = cargo;
	}

}
